﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Include/Admin.master" AutoEventWireup="true"
    CodeFile="SendMesToClient.aspx.cs" Inherits="Admin_AdminSendMessage_SendMesToClient"
    ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../../Style/Common/DatePage.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet"
        type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table class="editTable" align="center" style="width: 100%" cellspacing="1" cellpadding="0">
            <tr>
                <th colspan="2">
                    超级管理员给网站会员发送消息
                </th>
            </tr>
            <tr>
                <td style="text-align: left; width: 15%; vertical-align: top">
                    <table class="editTable" cellspacing="1">
                        <tr>
                            <th>
                                注册时间
                            </th>
                            <td>
                                从<asp:TextBox ID="txtTimeFrom" class="easyui-datebox" Width="110px" runat="server"></asp:TextBox><br />
                                到<asp:TextBox ID="txtTimeTO" class="easyui-datebox" Width="110px" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                账户类型
                            </th>
                            <td>
                                <asp:DropDownList ID="drpUserType" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                用户名
                            </th>
                            <td>
                                <asp:TextBox ID="txtUserName" Width="120px" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                用户状态
                            </th>
                            <td>
                                <asp:DropDownList ID="drpStatus" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" />
                            </td>
                        </tr>
                    </table>
                    <asp:CheckBox ID="cbAll" runat="server" />全选
                    <asp:ListView ID="lvDate" runat="server" DataKeyNames="ID" OnPagePropertiesChanged="lvDate_PagePropertiesChanged">
                        <LayoutTemplate>
                            <div id="UserList">
                                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                            </div>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbCheckBox" runat="server" /><%#Eval("Username")%><asp:HiddenField
                                ID="hdlUserID" Value='<%#Eval("ID")%>' runat="server" />
                            ;
                        </ItemTemplate>
                        <EmptyDataTemplate>
                            没有数据<br />
                            <br />
                        </EmptyDataTemplate>
                    </asp:ListView>
                    <asp:DataPager ID="Pager" runat="server" PagedControlID="lvDate" OnPreRender="Pager_PreRender"
                        PageSize="20">
                        <Fields>
                            <asp:NumericPagerField ButtonCount="50" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                            <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                                ShowFirstPageButton="true" />
                            <asp:TemplatePagerField>
                                <PagerTemplate>
                                    共<%=Pager.TotalRowCount%>条
                                </PagerTemplate>
                            </asp:TemplatePagerField>
                        </Fields>
                    </asp:DataPager>
                </td>
                <td class="style1">
                    <span class="red">*</span>
                    <asp:TextBox ID="txtMessage" runat="server" Height="500px" Width="99%"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Literal ID="litMessage" runat="server"></asp:Literal>
                    <div style="margin-top: 20px">
                        <input id="btnAddSend" type="button" value="发送" />
                        <asp:Button ID="bntSendZNX" Style="display: none" runat="server" Text="发送" OnClick="bntSendZNX_Click" />
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript" charset="utf-8" src="/kindeditor/kindeditor.js"></script>
    <script type="text/javascript" charset="utf-8" src="/kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript" charset="utf-8" src="/kindeditor/plugins/code/prettify.js"></script>
    <script type="text/javascript">
        var editor1;
        KindEditor.ready(function (K) {
            editor1 = K.create('#<%=txtMessage.ClientID %>', {
                width: '99%',
                resizeType: 1,
                cssPath: '/kindeditor/plugins/code/prettify.css',
                uploadJson: '/kindeditor/asp.net/upload_json.ashx',
                fileManagerJson: '/kindeditor/asp.net/file_manager_json.ashx',
                allowFileManager: true,
                filterMode: true,
                htmlTags: {
                    font: ['color', 'size', 'face', '.background-color'],
                    span: ['.color', '.background-color', '.font-size', '.font-family', '.background',
                                                            '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height'
                                                            ],
                    div: [
                'align', '.border', '.margin', '.padding', '.text-align', '.color',
                '.background-color', '.font-size', '.font-family', '.font-weight', '.background',
                '.font-style', '.text-decoration', '.vertical-align', '.margin-left'
        ],
                    table: [
                'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor',
                '.padding', '.margin', '.border', 'bgcolor', '.text-align', '.color', '.background-color',
                '.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background',
                '.width', '.height', '.border-collapse'
        ],
                    'td,th': [
                'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
                '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
                '.font-style', '.text-decoration', '.vertical-align', '.background', '.border'
        ],
                    a: ['href', 'target', 'name'],
                    embed: ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
                    img: ['src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'],
                    'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6': [
                'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background',
                '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'
        ],
                    pre: ['class'],
                    hr: ['class', '.page-break-after'],
                    'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del': []
                },
                urlType: 'relative',
                pasteType: 1,
                items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'link', '|', 'wordpaste', '|', 'selectall', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|', 'quickformat', '|', 'map'],
                afterCreate: function () {

                }

            });

        });

        $("#" + "<%=cbAll.ClientID %>").change(function () {
            var Check = $("#" + "<%=cbAll.ClientID %>").attr("checked");
            $("#UserList :checkbox").each(function () {
                $(this).attr("checked", Check);
            })

        })
        $("#btnAddSend").click(function () {
            if (editor1.isEmpty()) {
                alert("发送内容不能为空");
                return;
            }
            editor1.sync();
            $("#<%=bntSendZNX.ClientID %>").click();
        });
       
    </script>
    <script src="../../Scripts/jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
</asp:Content>
